package com.gmgx.dao;

import com.gmgx.dto.StudentDto01;
import com.gmgx.dto.StudentDto02;
import com.gmgx.entity.Student;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface IStudentDao {
    List<Student> queryAllStudents();
    boolean deleteStudent(int sno);
    int deleteStudent2(int sno);
    boolean addStudent(int sno, String password);
    boolean modifyStudent(Student stu);
    boolean modifyStudent2(@Param("sno") int sno, @Param("password") String password);
    boolean addStudent2(Student stu);
    // 模糊查询
    List<Student> queryStudentByLike(String sname);
    // 分页查询
    List<Student> queryStudentByPage(@Param("pageStart") int pageStart, @Param("pageSize") int pageSize);
    // 排序查询
    List<Student> queryStudentByOrder(@Param("colName") String colName, @Param("type") String type);

    /*boolean login(@Param("sno") String sno, @Param("password") String password);*/

    List<Student>  queryStudentByLikeAndPage(StudentDto01 studentDto);

    List<Student>  queryStudentByAge(@Param("lowAge") Integer lowAge, @Param("hiAge") Integer hiAge);
    List<StudentDto02> queryAllStudentAndClassroom();
    List<Student> queryAllStudentAndClassroom2();
}
